package Traductor;

import java.io.Serializable;

public class CTipoArray extends CTipo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public int nelems;
	public CTipo tbase;
	
	public CTipoArray(int nelems, CTipo tbase, int tam) {
		super(Tipo.ARRAY, tam);
		this.nelems = nelems;
		this.tbase = tbase;
	}
	
	public CTipo clone(){
		return new CTipoArray(this.nelems, this.tbase.clone(), this.tam);
	}
	
	public String toString(){
		return "<t: "+t.name()+", nelems: "+nelems+", tbase: "+tbase.toString()+", tam: "+tam+">";
	}

}
